package com.team.student.controller;

import com.team.student.entity.Stu;
import com.team.student.service.FindStuAndGrade;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @RestController实现了@Controller和@ResponseBody
 */
@RestController
public class TestController {
    @Autowired
    private FindStuAndGrade findStuAndGrade;
    @RequestMapping(value = "/getStus")
    public List<Stu> getStus(){
       return findStuAndGrade.FindStuAndGrade();
    }
}
